<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="java.sql.*" %>

<html>
<head>
    <title>管理员</title>
</head>
<body>
<% 
// 接收用户数据
request.setCharacterEncoding("utf-8");
String admin_id = request.getParameter("admin_id");
String admin_pwd = request.getParameter("admin_pwd");

String btn = request.getParameter("btn");
String sql = "";
//insert
sql = "insert into (admin_pwd) values('"+ admin_pwd +"')";
if("修改".equals(btn)){
//update
sql = "update admin set admin_pwd='" + admin_pwd +"'";
}else if("del".equals(btn)){
//delete
sql = "delete from admin where  admin_pwd='"+ admin_pwd + "'";
}
int ret = com.myweb.DBTools.update(sql);
System.out.println("ret=" + ret);
//返回到页面
response.sendRedirect("adminchecklogin.jsp");

%>
</body>
</html>